#include "TCPServer.hpp"

static void Usage(std::string proc)
{
    printf("Usage:\n\t%s %s\n",proc.c_str(),"port");
}

int main(int args,char* argv[])
{
    //提示信息
    if(args!=2)
    {
        Usage(argv[0]);
        exit(1);
    }

    //处理端口
    uint16_t port=atoi(argv[1]);
    std::unique_ptr<TCPServer> ts(new TCPServer(port));
    ts->initServer();
    ts->start();

    return 0;
}